<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>git</title>

    <style>
        .header{
            background:red;
            height:100px;
            width:100px;
        }
    </style>
</head>
<body>
    <div class="header"></div>
    <div class="content"></div>
    <div class="footer"></div>
    <button class="btn">设置颜色</button>

    <script>
        var btn = document.querySelector('btn')
        btn.onclick = function(){
            btn.style.width = "100px"
            btn.style.height = "100px"
            btn.style.background = "green"
        }
    </script>
</body>
</html>